<?php
/**
 * Author：晴天 QQ：1186258278
 * Creation：2020/3/6 17:11
 * Filename：shop.php
 */
if (!defined('IN_CRONLITE')) die();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      style="<?= background::image() == false ? 'background:#fff;' : background::image() ?>">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <title><?= $conf['sitename'] . ($conf['title'] == '' ? '' : ' - ' . $conf['title']) ?></title>
    <meta name="keywords" content="<?= $conf['keywords'] ?>">
    <meta name="description" content="<?= $conf['description'] ?>">
    <link rel="stylesheet" type="text/css" href="<?php echo $cdnserver; ?>assets/layui/css/layui.css"/>
    <link type="text/css" rel="stylesheet"
          href="<?php echo $cdnserver; ?>assets/AppStore/css2/style.css?var=<?= $accredit['versions'] ?>"/>
    <link href="<?= $cdnpublic ?>Swiper/4.5.1/css/swiper.min.css" rel="stylesheet">
    <link href="<?php echo $cdnpublic ?>limonte-sweetalert2/7.33.1/sweetalert2.min.css" rel="stylesheet">
    <link href="<?php echo $cdnpublic ?>animate.css/3.7.2/animate.min.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="<?php echo $cdnpublic ?>html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="<?php echo $cdnpublic ?>respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<style>.btnee {
        width: 20%;
        float: right;
        margin-top: -2.8em;
    }

    .down_shop {
        height: 1em;
        text-align: center;
        width: 100%;
        display: block;
        color: red;
    }
</style>
<body>
<div class="hdbox">
    <div class="hdbox0">
        <div class="hdbox_1"><a href="/" class="goback">
                <img src="/assets/AppStore/images/goback.png">
            </a>
        </div>
        <div class="hdbox_2">
            <ul>
                <li class="on"><a href="#m1">商品</a></li>
                <li><a href="#m2">详情</a></li>
                <li><a href="#m3">评价</a></li>
            </ul>
        </div>
        <div class="hdbox_3">
            <a href="/?mod=cart"><img src="/assets/AppStore/images/h1.png"/></a>
        </div>
    </div>
</div>
<div class="hbox"></div>
<a name="m1">
    <div class="xqbox1">
        <div class="swiper-container" style="width: 100%;max-height: 55vh;text-align: center">
            <div class="swiper-wrapper" id="picture"></div>
            <div class="swiper-pagination"></div>
        </div>
        <p id="gootsp" class="price tit"><span id="gootsp"></span></p>
        <div class="qita">
            <p class="p1">
                <d id="moneys" class="price_app"></d>
                <span>促销商品</span><span style="background-color:yellowgreen">×<sp class="quantitys">1</sp></span></p>
            <p class="p2"><span class="price_inventory"><span id="count_quota"></span></span></p>
        </div>
    </div>
</a>
<div class="xqbox2">
    <div class="xqbox2L">
        <img src="/assets/AppStore/images/my3.png"/>
        <span class="level" id="level">载入中</span>
    </div>
    <div class="xqbox2R">
        <img src="/assets/AppStore/images/more.png">
    </div>
</div>
<div class="clear"></div>
<div class="kbox"></div>
<div class="xqbox2 sizetype">
    <div class="xqbox2L">
        <span>填写商品购买参数</span>
    </div>
    <div class="xqbox2R">
        <img src="/assets/AppStore/images/more.png">
    </div>
</div>
<div class="clear"></div>
<div class="kbox"></div>
<a name="m3">
    <div class="xqpj">
        <div class="xqpjtit">
            <div class="xqbox2L">
                <span>商品评价(<span id="pj">0</span>)</span>
            </div>
            <div class="xqbox2R">
                <img src="/assets/AppStore/images/more.png">
            </div>
        </div>
        <div class="xqpjbox"></div>
        <div class="morepj">
            <a href="/?mod=evaluate&gid=<?= $_QET['gid'] ?>">查看更多评价</a>
        </div>
    </div>
</a>
<div class="clear"></div>
<div class="kbox"></div>
<div class="clear"></div>
<div class="kbox"></div>
<?php if ($conf['GoodsRecommendation'] == 1) { ?>
    <div class="xgtj" style="display: none">
        <div class="tjtit">相关推荐</div>
        <div class="tjcon">
            <ul id="GoodsClass">载入中</ul>
        </div>
    </div>
<?php } ?>
<div class="clear"></div>
<a name="m2">
    <div class="kbox"></div>
</a>

<div class="xqtab">
    <div class="Menubox">
        <ul>
            <li class="hover" onclick="setTab('two',1,3)" id="two1">图文详情</li>
            <li class="" onclick="setTab('two',2,3)" id="two2">产品参数</li>
            <li class="" onclick="setTab('two',3,3)" id="two3">热卖推荐</li>
        </ul>
    </div>
    <div class="Contentbox">
        <div id="con_two_1" style="margin-bottom: 6rem;">
            <div class="xqsub">
                <div id="alert_frame"></div>
            </div>
        </div>
        <div style="display:none;margin-bottom: 6rem;" id="con_two_2">
            <div class="canshu">
                <div class="canshu_1">
                    <p class="pl">最少购买</p>
                    <p class="pr min"></p>
                </div>
            </div>
            <div class="canshu">
                <div class="canshu_1">
                    <p class="pl">最多购买</p>
                    <p class="pr max"></p>
                </div>
            </div>
            <div class="canshu">
                <div class="canshu_1">
                    <p class="pl">商品售价</p>
                    <p class="pr prices"></p>
                </div>
            </div>
            <div class="canshu">
                <div class="canshu_1">
                    <p class="pl">兑换价格</p>
                    <p class="pr points"></p>
                </div>
            </div>
            <div class="canshu">
                <div class="canshu_1">
                    <p class="pl">每份数量</p>
                    <p class="pr quantity"></p>
                </div>
            </div>
            <div class="canshu">
                <div class="canshu_1">
                    <p class="pl">今日库存</p>
                    <p class="pr count_quota"></p>
                </div>
            </div>
            <div class="canshu">
                <div class="canshu_1">
                    <p class="pl">商品编号</p>
                    <p class="pr gid"></p>
                </div>
            </div>
            <div class="canshu">
                <div class="canshu_1">
                    <p class="pl">我的级别</p>
                    <p class="pr level"></p>
                </div>
            </div>
            <div class="canshu">
                <div class="canshu_1">
                    <p class="pl">分类编号</p>
                    <p class="pr cid"></p>
                </div>
            </div>
        </div>
        <div style="display:none;margin-bottom: 6rem;" id="con_two_3">
            <div class="likebox bort">
                <ul id="GoodsRound">载入中</ul>
            </div>
        </div>
    </div>
</div>
<div class="clear"></div>
<div class="xqbotbox">
    <div class="xqbotbox0">
        <div class="xqbotboxL">
            <ul>
                <li>
                    <a href="javascript:template.kefu('<?= $conf['kfqq'] ?>')">
                        <img src="/assets/AppStore/images/xqf1.png"/>
                        <p>客服</p>
                    </a>
                </li>
                <li>
                    <a href="/user/">
                        <img src="/assets/AppStore/images/xqf2.png"/>
                        <p>加盟</p>
                    </a>
                </li>
                <li>
                    <a href="javascript:template.SharePoster($_GET['gid'])">
                        <img src="/assets/AppStore/images/xqf3.png"/>
                        <p>分享</p>
                    </a>
                </li>
            </ul>
        </div>
        <div class="xqbotboxR">
            <a class="a2 sizetype" data-m="1">立即购买</a>
            <a class="a1 sizetype" data-m="2">加入购物车</a>
        </div>
    </div>
</div>
<div class="xzsize">
    <div class="xzsize0">
        <style>
            @media screen and (min-width: 640px) {
                #size {
                    margin-left: calc((100% - 640px) / 2);
                }
            }
        </style>
        <div class="f_mask0"></div>
        <div id="size"
             style="width: 100%;max-width: 640px;display: block;">
            <div class="size1">
                <div class="size1_1">
                    <img class="imagename"/>
                </div>
                <div class="size1_2">
                    <p class="p1 prices price_app"></p>
                    <p class="p2">商品编号：<span id="gid"></span></p>
                    <p class="p3">库存<span id="repertory"></span>件</p>
                </div>
                <div class="size1_3">
                    <img src="/assets/AppStore/images/close.png"/>
                </div>
            </div>
            <div class="size2">
                <div class="purchase" style="height: 50vh;overflow:hidden;overflow-y: auto ">
                    <div id="input_value"></div>
                    <div id="matching_msg"
                         style="display:none;box-shadow: 3px 3px 16px #eee;padding: 1em;text-align: center;"></div>
                </div>
                <span class="layui-icon layui-icon-down down_shop" style="display: none"></span>
            </div>
            <div class="size3 but">
                <a id="submit">确定</a>
                <a id="submit_cart" style="display: none">添加到购物车</a>
            </div>
        </div>
    </div>
</div>

<script src="<?php echo $cdnpublic ?>jquery/1.12.4/jquery.min.js"></script>
<script src="<?php echo $cdnserver; ?>assets/layui/layui.all.js"></script>
<script src="<?= $cdnpublic ?>Swiper/4.5.1/js/swiper.min.js"></script>
<script src="<?php echo $cdnpublic ?>limonte-sweetalert2/7.33.1/sweetalert2.min.js"></script>
<script src="<?php echo $cdnserver; ?>assets/js/main.js?var=<?= $accredit['versions'] ?>"></script>
<script>logo = "<?=$conf['logo']?>"</script>
<script src="/template/AppStore/template.js?var=<?= $accredit['versions'] ?>"></script>

<script type="text/javascript">
    $('.sizetype').click(function () {
        $("#size").animate({bottom: "0"}, 500);
        $('.f_mask0').show();
        if ($(this).attr('data-m') == '2') {
            $("#submit_cart").show(100);
            $("#submit").hide(100);
        } else {
            $("#submit").show(100);
            $("#submit_cart").hide(100);
        }
        $("body").css({'height': '100%', 'overflow': 'hidden'});
    });
    $('.size1_3 img').click(function () {
        $('.f_mask0').hide();
        $('#size').animate({bottom: "-80%"}, 500);
        $("body").css({'height': 'auto', 'overflow': ''});
    });
    $('.hdbox_2 ul li').click(function () {
        $('.hdbox_2 ul li').removeClass('on');
        $(this).addClass('on');
    })
</script>
<script type="text/javascript">
    function setTab(name, cursel, n) {
        for (i = 1; i <= n; i++) {
            var menu = document.getElementById(name + i);
            var con = document.getElementById("con_" + name + "_" + i);
            menu.className = i == cursel ? "hover" : "";
            con.style.display = i == cursel ? "block" : "none";
        }
    }
</script>
</body>
</html>
